package org.xy.yq.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.xy.yq.entity.City;

import java.util.List;


public interface ICityDao {
    @Insert("insert into city(provinceName,cityName,conNum,cureNum,econNum,deathNum,time) values(#{provinceName},#{cityName},#{conNum}" +
            ",#{cureNum},#{econNum},#{deathNum},#{time})")
    void insertCity(City city);
    @Select("select * from city where provinceName=#{provinceName}")
    List<City> getCity(@Param("provinceName") String province);
    @Select("select * from city order by econNum desc limit 0,5")
    List<City> top5();
}
